'use strict';function _ne(a,b,c=document){b=_Lo(_Ou(a,b,c));b instanceof Node||_6p("docFragNotNode",{templId:a});return $(document.importNode(b,!0).childNodes)}function _8k(a){return $(a).on("mousewheel",function(b){b=b.originalEvent||b;(0<b.wheelDelta?0==this.scrollTop:this.scrollTop+this.clientHeight==this.scrollHeight)?b.preventDefault():b.stopPropagation()})}function _Bd(a){requestAnimationFrame(()=>setTimeout(a))}
function _Tr(a,b){if(_ff()&&!a.closest("[dontFocus]")){let c=$(_Gi).not($(a).parents().addBack()),d=$(a).closest("dialog[modal=true]")[0];d&&(c=c.filter((f,e)=>d.contains(e)));c.each(function(){!$(this).is(":visible")||document.contains(this)&&!document.contains(a)||($(a).closest(this.popupTriggerElem).length&&(this.popupTriggerElem.cancelNextPopup=+new Date),$(this).triggerEvt("focusLost"))});$(_Gi).filter($(a).parents().addBack()).triggerEvt({focusGained:b?"force":null})}}
function _ff(){if(_Gi)return _Gi=_Gi.filter(a=>document.contains(a)&&$(a).is(":visible")),!!_Gi.length}let _Gi;
function _I(a){_Gi||(_Gi=[],$(window).captureEvt("mousedown",b=>_Tr(b.target)));_Gi.remove($(a)[0]);_Gi.unshift($(a)[0]);$(a).offOn("focusLost.autoClose",function(b){$(this).is("floatbox:has(> cont)")&&!$(">cont",this)[0].contains(b.target)&&$("> cont > *",this).triggerEvt("focusLost");$(this).is("[dontCloseOnFocusLost], floatbox:has(> cont > [dontCloseOnFocusLost])")||(b.stopPropagation(),$(this).triggerEvt("close"))});return a}
function _ke(){if(_ff()){var a=_Gi;a=$(a.slice(a.push(a.shift())-1)).triggerEvt("focusLost")[0];_y();return a}}function _y(){_Gi&&_Tr(_Gi[0],!0)}function _ma(a){var b=document.createElement("canvas");b.width=1;b.height=1;b=b.getContext("2d");for(let c of a)b.fillStyle=c,b.fillRect(0,0,1,1);a=b.getImageData(0,0,1,1).data;return{r:a[0],g:a[1],b:a[2],a:a[3]}}function _Xt(a){return $(a).parent().children($(a)[0].tagName).index(a)}
function _xw(a,b){document.activeElement!=a&&0==a.selectionStart&&a.selectionStart==a.selectionEnd&&a.setSelectionRange(a.value.length,a.value.length);let c=a.value.substr(0,a.selectionStart),d=a.value.substr(a.selectionEnd);b=(""+b).substr(0,(0<a.maxLength?a.maxLength:9E9)-c.length-d.length);a.value=c+b+d;a.selectionStart=a.selectionEnd=c.length+b.length;$(a).triggerEvt("input",!0)}
function _Lf(a){let b=document.createRange();b.selectNode(a);a=window.getSelection();a.removeAllRanges();a.addRange(b)}function _na(a){a.isContentEditable||(a.contentEditable=!0,a.focus(),_Lf(a.firstChild))}let _ro=0,_wi=0,_ci=0,_l=0;window.addEventListener("mousemove",a=>{_ro=a.clientX;_wi=a.clientY;_ci=a.screenX-_ro;_l=a.screenY-_wi},!0);function _U(a){return{x:a.x+_ci,y:a.y+_l}}function _cg(a){return{x:a.x-_ci,y:a.y-_l}}
function _Sp(a,b=!1){const c=$(a).outerWidth();a=$(a).outerHeight();const d=$(window).width(),f=$(window).height();var e=_ro||_wi;const m=b&&e?_ro:d/2;b=b&&e?_wi:f/2;e=_Qe((d-c)/2,0,40);const p=_Qe((f-a)/2,0,40);return{left:_Qe(m-c/2,e,d-e-c),top:_Qe(b-a/2,p,f-p-a)}}
function _Lp(a,b,c=400){let d=$(a)[0<b?"next":"prev"]();if(d[0]){var f=$(a).outerHeight(!0),e=d.outerHeight(!0),m=d.add(a).css("transition","none");$(a)["insert"+(0<b?"After":"Before")](d.css("transform",`translateY(${b*f}px)`)).css("transform",`translateY(${-b*e}px)`);_Bd(()=>{m.css("transition",`transform ${c}ms cubic-bezier(0.5, 0, 0.45, 1)`).css("transform","")})}}
function _Wg(){$(document).keydown(function(a){27==a.keyCode&&_Gi&&!$(_Gi[0]).is("dialog")&&_ke()&&a.preventDefault()}).captureEvt("mousedown input mouseup","[type=number]",function(a){"mousedown"==a.type&&(this.prevFocusState=document.activeElement==this);"mouseup"==a.type&&"input"==this.prevEvtType&&0==this.prevFocusState&&this.blur();"input"==a.type&&""!==this.value&&(this.min&&+this.value<this.min||this.max&&+this.value>this.max)&&(this.value=_Qe(this.value,this.min,this.max));this.prevEvtType=
a.type}).captureEvt("wheel","[type=number]",function(a){this==document.activeElement&&(a.preventDefault(),0<a.originalEvent.wheelDelta?this.stepUp():this.stepDown(),$(this).triggerEvt("input",!0))}).captureEvt("wheel",function(a){if(!(a.ctrlKey||a.shiftKey||a.altKey)){if(a.originalEvent.deltaX){var b="Width";var c="Left";var d="X";var f=a.originalEvent.deltaX}else a.originalEvent.deltaY&&(b="Height",c="Top",d="Y",f=a.originalEvent.deltaY);if(b)for(let e=a.target;e!=document.documentElement&&e!=document;e=
e.parentElement)if(e instanceof Element||_6p("badWheelEvtTgt",{elemType:e.constructor.name}),(0>f?0!=e["scroll"+c]:e["scroll"+c]+("BODY"==e.tagName?window["inner"+b]:e["client"+b])!=e["scroll"+b])&&getComputedStyle(e)["overflow"+d].in("auto","scroll")){$(".popup",e).length&&a.preventDefault();break}}})}
var _Kd=(a,b)=>c=>{$("<input type=file>").attr("accept",a).change(function(){let d=this.files;if(d.length)if(b){let f=new FileReader;f.onload=function(){c(this.result,d[0])};f["readAs"+({text:"Text",dataUri:"DataURL",binary:"BinaryString"}[b]||"DataURL")](d[0])}else c(d[0])}).click()};
function _Bj(...a){function b(c,d,...f){function e(){let g={};var k="";for(var h=0;h<=f.length;++h){var n=d[h]||"";let l=f[h],q=n.match(m);q?(g[h]={prop:q[1],value:l},k+=n.replace(m,"z9iw7u2il9q5e_"+h)):l&&"object"==typeof l?(g[h]={value:l},k+=n+`<ph ${"z9iw7u2il9q5e_"+h}></ph>`):k+=n+(null==l?"":l)}if(0==Object.keys(g).length)return c(k);k=_Lo(k);for(let l in g)h=g[l],n=$(k.querySelector(`[${"z9iw7u2il9q5e_"+l}]`)),h.prop?n.removeAttr("z9iw7u2il9q5e_"+l)[0][h.prop]=h.value:n.replaceWith(h.value);
return c(k)}c=c||(g=>g);let m=/(\w+)=\$$/,p=new _do;for(let g=0;g<f.length;++g)if(_Mg(f[g])&&!(d[g]||"").match(m)&&(f[g]=b(null,[],...f[g])),"function"==typeof f[g])f[g](p.onReady(k=>f[g]=k));return p.asyncTotal?g=>p.setCallback(()=>g(e())):e()}return _Mg(a[0])?b(null,...a):(...c)=>b(a[0],...c)}let _lo=a=>a instanceof DocumentFragment?$(a.children):$(a);
function _kd(a,b){let c=document.createElement("LINK");c.rel="stylesheet";c.href=a;c.addEventListener("load",b);return document.head.appendChild(c)}function _zy(a){return(b=_Qu)=>{document.querySelector(`link[rel=stylesheet][href='${a}']`)?b():_kd(a,b)}}
function _ko(a,b){a.pendingScroll=(a.pendingScroll||0)+b;if(!a.busyScrolling){let c=()=>{if(a.pendingScroll){a.busyScrolling=!0;let d=Math.max(0,Math.min(a.scrollLeft+a.pendingScroll,a.scrollWidth-a.offsetWidth+10));a.pendingScroll=0;$(a).animate({scrollLeft:d},{duration:120,easing:"linear",always:c,queue:!1})}else a.busyScrolling=!1};c()}}
function _br(a){let b=(Date.now()-a)/1E3,c="second";if(59.5<=b&&(b/=60,c="minute",59.5<=b&&(b/=60,c="hour",23.5<=b&&(b/=24,c="day",6.5<=b&&(b/=7,c="week",4.3<=b)))))return _ql(a,"Y-M-D");a=Math.round(b);return`${a} ${c}${1!=a?"s":""} ago`}
function _Oo(a,b=!0){let c=b&&a.clientWidth>=a.scrollWidth;b=b&&a.clientHeight>=a.scrollHeight;c&&(a.style.width="1px");b&&(a.style.height="1px");let d=[a.scrollWidth+a.offsetWidth-a.clientWidth,a.scrollHeight+a.offsetHeight-a.clientHeight];c&&(a.style.width="");b&&(a.style.height="");return d}
function _3e(a,b=!1,c=9E9,d=9E9){if(a){var [f,e]=_Oo(a,b);b=Math.min(_3y(c)[0],window.innerWidth+(_3y(c)[1]||9E9),f);d=Math.min(_3y(d)[0],window.innerHeight+(_3y(d)[1]||9E9),e);a.style.width=b+"px";a.style.height=d+"px"}};
